package com.kly.user.db.dao.impl;
import com.fqgj.common.base.AbstractBaseMapper;
import com.kly.user.db.dao.ChatterWorkSettingDao;
import com.kly.user.db.entity.ChatterWorkSettingEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* User: yujianfu
* Date: 2023-08-22
* Time: 21:54:17.046
*/

@Repository
public class ChatterWorkSettingDaoImpl extends AbstractBaseMapper<ChatterWorkSettingEntity> implements ChatterWorkSettingDao {

    @Override
    public List<ChatterWorkSettingEntity> getSettingsByChatterCods(List<String> chatterCodes) {
        Map<String, Object> params = new HashMap<>();
        params.put("chatterCodes", chatterCodes);
        return getSqlSession().selectList(this.getStatement("getSettingsByChatterCods"), params);
    }

    @Override
    public ChatterWorkSettingEntity getChatterWorkSetting(String chatterCode) {
        Map<String, Object> params = new HashMap<>();
        params.put("userCode", chatterCode);
        return getSqlSession().selectOne(this.getStatement("getChatterWorkSetting"), params);
    }
}